package com.maimao.core.enums;

/**
 * @author MaoLin Wang
 * @date 2020/11/30 4:25 下午
 */
public enum AuthEnum {

    /**
     * 申请令牌失败
     */
    APPLY_TOKEN_FAIL(false,5001,"申请令牌失败"),
    SAVE_TOKEN_FAIL(false,5002,"存储令牌失败"),

    NO_SERVICE_FOUND(false,5003,"没有找到认证服务"),
    LOGIN_ERROR(false,5004,"用户名或密码错误"),
    USER_NOT_FOUNT(false,5005,"用户不存在"),
    NOT_AUTH(false,5006,"尚未登录或登录过期"),
    FORBIDDEN(false,403,"权限不足"),
    TOKEN_NOT_VALID(false,403,"登录失效，请重新登录"),
    AUTH_ERROR(false,5007,"身份认证出错"),
    LOGIN_REPEAT(false,5008,"您已经在其他地点登录，请退出后再登录");
    private Boolean flag;
    private Integer code;
    private String message;

    AuthEnum() {
    }

    AuthEnum(Boolean flag, Integer code, String message) {
        this.flag = flag;
        this.code = code;
        this.message = message;
    }

    public Boolean isFlag() {
        return flag;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
